using System.ComponentModel;

namespace ZeBobo5.LibraryHelper.Orm
{
    public class OrmDataElementOperatingEventArgs<A> : CancelEventArgs
        where A : OrmDataElementBase<A>
    {
        private readonly OrmDataElementState operation;
        private readonly A sqlTableData;

        public OrmDataElementOperatingEventArgs(A sqlTableData, OrmDataElementState operation)
        {
            this.sqlTableData = sqlTableData;
            this.operation = operation;
        }

        public A Data
        {
            get { return sqlTableData; }
        }

        public OrmDataElementState Operation
        {
            get { return operation; }
        }
    }
}